<template>
  <div id="china" class="pt" :class="{ h5: this.$store.state.webType === 'h5' }">
    <el-row :span="24" class="page-content">
      <el-row :span="24" class="art-row">
        <div class="governance_content">
          <el-carousel
            trigger="click"
            height="300px"
            :initial-index="currentIndex"
            ref="homeCarousel"
            @change="changeBanner"
            indicator-position="none"
          >
            <!-- :src="banner.imgUrl" -->
            <!-- src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/c7266c1c71db4a91bca09ccaf85d2fde_mergeImage.png" -->
            <el-carousel-item v-for="(banner, bdx) in bannerList" :name="bdx + ''" :key="bdx">
              <img
                v-if="$store.state.webType !== 'h5'"
                @click.stop="$goDetail(banner.id)"
                height="300px"
                width="100%"
                :src="banner"
                :alt="banner.title"
              />
              <div v-if="$store.state.webType !== 'h5'" class="banner-big-info">
                <div class="banner-big-info-who">Who We Are</div>
                <div class="banner-big-info-content">{{ banner.title }}</div>
                <div class="banner-big-info-more">more --></div>
              </div>
              <div
                v-else
                @click.stop="$goDetail(banner.id)"
                :style="{
                  height: '100%',
                  background: `url('${banner.imgUrl}') no-repeat  center`,
                  backgroundSize: 'contain',
                }"
              ></div>
            </el-carousel-item>
          </el-carousel>

          <!-- <el-carousel height="150px">
            <el-carousel-item v-for="item in allGovernanceObj.banner" :key="item">
              <h3 class="small">{{ item }}</h3>
            </el-carousel-item>
          </el-carousel> -->
          <div class="gov_content_box">
            <div class="gov_content_left">
              <div class="detail_item" v-for="(itemList, ind) in nav_bar_list" :key="ind">
                <div class="detail_item_title">{{ itemList.title }}</div>
                <div v-html="itemList.content" class="gov_detail_content_info"></div>
              </div>

              <!-- <div class="detail_item">
                <div class="detail_item_title">Introductions</div>
                <div>jdhf</div>
                <div>jdhf</div>
                <div>jdhf</div>
                <div>jdhf</div>
                <div>jdhf</div>
                <div>jdhf</div>
              </div>
              <div class="detail_item">
                <div class="detail_item_title">World Congrees</div>
                <div>2</div>
                <div>2</div>
                <div>2</div>
                <div>2</div>
                <div>2</div>
                <div>2</div>
                <div>2</div>
              </div>
              <div class="detail_item">
                <div class="detail_item_title">Executive Board</div>
                <div>33</div>
                <div>33</div>
                <div>33</div>
                <div>33</div>
                <div>33</div>
                <div>33</div>
                <div>33</div>
              </div>
              <div class="detail_item">
                <div class="detail_item_title">The Secretariat</div>
                <div>44</div>
                <div>4</div>
                <div>4</div>
                <div>4</div>
                <div>4</div>
                <div>4</div>
                <div>4</div>
              </div>
              <div class="detail_item">
                <div class="detail_item_title">The Secretariat</div>
                <div>5</div>
                <div>5</div>
                <div>5</div>
                <div>5</div>
                <div>5</div>
              </div>
              <div class="detail_item">
                <div class="detail_item_title">The Secretariat</div>
                <div>6</div>
                <div>6</div>
                <div>6</div>
                <div>6</div>
                <div>6</div>
                <div>6</div>
                <div>6</div>
                <div>6</div>
                <div>6</div>
                <div>6</div>
              </div> -->
            </div>
            <div class="gov_content_right">
              <div class="nav_bars" id="scrollBox">
                <ul class="clearfix" style="list-style: none">
                  <template v-for="(item, key) in nav_bar_list">
                    <li
                      @click="jump2(key)"
                      class="fl_left nav1"
                      :class="{ cur: activeMenu === key }"
                      :key="key"
                    >
                      {{ item.title }}
                    </li>
                  </template>
                </ul>
              </div>
            </div>
            <!-- <el-tabs class="customer-tab" type="card" @tab-click="jump" v-model="tabName">
              <el-tab-pane
                v-for="(tab, index) in tabs"
                :name="tab.refName"
                :key="index"
                :label="tab.name"
              ></el-tab-pane>
            </el-tabs> -->

            <!-- <div class="gov_content_left"></div>
            <div class="gov_content_right">
              <el-tabs tab-position="right" style="height: 200px">
                <el-tab-pane label="The World Congress"></el-tab-pane>
                <el-tab-pane label="Introduction to Federation Institutions"></el-tab-pane>
                <el-tab-pane label="The Mechanism of the Federation"></el-tab-pane>
                <el-tab-pane label="The Chairman"></el-tab-pane>
                <el-tab-pane label="Chairman's speech"></el-tab-pane>
                <el-tab-pane label="List of the World Congress of WFUCA"></el-tab-pane>
              </el-tabs>
            </div> -->
          </div>
        </div>
        <infinite-scroll class="infinite" @loadBottom="loadMore">
          <div
            class="art-view"
            v-masonry
            :horizontal-order="true"
            transition-duration="0s"
            item-selector=".art-item"
            :fit-width="false"
            :gutter="gutterWidth"
            style="height: auto"
            :class="{ text: currentView === 'text' }"
          >
            <template v-if="currentView === 'img'">
              <div
                class="art-item scale-view"
                v-masonry-tile
                @click="$goDetail(img.id)"
                v-for="(img, idx) in artData"
                :key="idx"
              >
                <img :src="img.imgUrl" :alt="img.title" />
                <div class="art-content">
                  <div class="item-title two-line">
                    {{ img.title }}
                  </div>
                  <div class="item-info">
                    <div
                      class="info-label"
                      v-if="img.label && img.label.length > 0 && $store.state.lang === 'CN'"
                    >
                      {{ currentLabel ? currentLabel : img.label[0] }}
                    </div>
                    <div class="info-time">{{ img.peridos }}</div>
                  </div>
                  <div class="item-content">{{ img.content }}</div>
                </div>
              </div>
            </template>
            <template v-else>
              <div
                class="art-item"
                v-masonry-tile
                @click="$goDetail(img.id)"
                v-for="(img, idx) in artData"
                :key="idx"
              >
                <div class="art-content">
                  <div class="item-title">
                    {{ img.title }}
                    <div class="item-info">
                      <div
                        class="info-label"
                        v-if="img.label && img.label.length > 0 && $store.state.lang === 'CN'"
                      >
                        {{ currentLabel ? currentLabel : img.label[0] }}
                      </div>
                      <div class="info-time">{{ img.peridos }}</div>
                    </div>
                  </div>
                  <div class="item-content">{{ img.content }}</div>
                </div>
              </div>
            </template>
            <div v-if="listQuery.pageNum < maxPage" class="art-more true" @click="getListMore()">
              {{ $t("more2") }} >
            </div>
            <div v-else class="art-more none">{{ $t("noMore") }}</div>
          </div>
        </infinite-scroll>
      </el-row>
    </el-row>
  </div>
</template>

<script>
import HotArticle from "@/components/HotArticle";
import NewBook from "@/components/NewBook";
import { scrollTo } from "@/utils/scrollTo.js";

export default {
  name: "china",
  components: {
    HotArticle,
    NewBook,
  },
  data() {
    return {
      busy: true,
      nomore: false,
      gutterWidth: 20,

      bannerHeight: 0, // 轮播图容器高度;
      screenWidth: 0,
      bannerList: [],

      currentLabel: "",
      currentView: "img",
      bannerData: {},
      bookData: {},
      articleData: [],
      // 文章列表
      artData: [],
      // 文章总数量
      listTotal: 0,
      maxPage: 1,
      // 文章列表请求信息
      listQuery: {
        gId: "",
      },
      // 标签
      labelData: [],
      tabIndex: "0",
      contentStyleObj: {
        height: "100px",
      },
      tabName: "setOneRef",
      nav_bar_list: [
        {
          name: "Introductions",
          refName: "setOneRef",
          show: true,
        },
        {
          name: "World Congrees",
          refName: "setTwoRef",
          show: true,
        },
        {
          name: "Executive Board",
          refName: "setThreeRef",
          show: true,
        },
        {
          name: "The Secretariat",
          refName: "setFourRef",
          show: true,
        },
        {
          name: "The Secretariat",
          refName: "setFourRef",
          show: true,
        },
        {
          name: "The Secretariat",
          refName: "setFourRef",
          show: true,
        },
      ],
      allGovernanceObj: {},
      activeMenu: 0,
      scroll: "",
      scrollBox: "300",
      ceiling: false,
      click_scroll_num: 0,
      tabs: [
        {
          name: "用户管理",
          refName: "setOneRef",
        },
        {
          name: "配置管理",
          refName: "setTwoRef",
        },
        {
          name: "角色管理",
          refName: "setThreeRef",
        },
        {
          name: "角色管理2",
          refName: "setFourRef",
        },
      ],
    };
  },
  created() {
    this.activeMenu = 0;

    // this.getHight();
    // window.addEventListener("resize", this.getHight);
  },
  destroyed() {
    window.removeEventListener("resize", this.getHight);
  },
  watch: {
    scroll: function () {
      this.loadSroll();
    },
  },
  mounted() {
    var $scrollBox = document.getElementById("scrollBox");
    this.listQuery.gId = this.$route.query.id;

    window.addEventListener("scroll", this.dataScroll);
    // this.scrollBox = scrollBox.offsetTop;

    if (this.$route.query.token) {
      sessionStorage.setItem("token", this.$route.query.token);
    }
    // this.listQuery.columnId = this.$getPartId(this.$route.path);
    // this.listQuery.menuId = this.$getMenuId(this.$route.path);
    this.getList();
    // // this.getBanner();
    // this.getLabels();
    // 首次加载时,初始化高度
    this.screenWidth = window.innerWidth;
    this.bannerHeight = (748 / 1920) * this.screenWidth;
    // 窗口大小发生改变
    window.onresize = () => {
      this.screenWidth = window.innerWidth;
      this.bannerHeight = (748 / 1920) * this.screenWidth;
    };
  },
  methods: {
    // 锚点滚动
    jump2(index) {
      console.log(index, "index-click");
      let jump = document.getElementsByClassName("detail_item");
      console.log(jump, "jumps-->");
      var $scrollBox = document.getElementById("scrollBox");
      this.activeMenu = index;
      // 获取需要滚动的距离
      let total = 0;
      console.log($scrollBox.classList.length, "$scrollBox.classList.length");
      if ($scrollBox.classList.length === 1) {
        // total = jump[index].offsetTop + 50;原装
        total = jump[index].offsetTop + 18;
      } else {
        console.log(this.ceiling, "ceiling-->");
        if (this.ceiling) {
          // if (this.$store.state.resize.screenWidth <= 1346) {
          //   total = jump[index].offsetTop + 102;
          // }
          // else {
          // total = jump[index].offsetTop + 102;原装
          total = jump[index].offsetTop + 18;
          // }
        } else {
          // total = jump[index].offsetTop + 122;原装
          total = jump[index].offsetTop + 18;
        }
      }
      const userAgent = navigator.userAgent;
      let isChrome =
        userAgent.indexOf("Chrome") > -1 &&
        userAgent.indexOf("Safari") > -1 &&
        userAgent.indexOf("Edge") == -1 &&
        userAgent.indexOf("OPR") == -1;
      console.log(isChrome, "isChrome");
      if (isChrome) {
        // Chrome
        scrollTo(total, 600);
        this.click_scroll_num = total;
      }
      // document.body.scrollTop = total;
      // Firefox
      document.documentElement.scrollTop = total;
      // Safari
      window.pageYOffset = total;
    },
    loadSroll: function () {
      var self = this;
      var $navs = document.getElementsByClassName("nav1");
      var sections = document.getElementsByClassName("detail_item");
      var $scrollBox = document.getElementById("scrollBox");
      console.log(self.scroll, "---->", self.scrollBox);
      if (self.scroll >= self.scrollBox) {
        if (self.ceiling) {
          $scrollBox.className = "nav_bars scrollBox2";
          // console.log("self.$store.state.resize.screenWidth");
          // if (self.$store.state.resize.screenWidth <= 1346) {
          //   $scrollBox.className = "nav_bars scrollBox1";
          // } else {
          //   $scrollBox.className = "nav_bars scrollBox2";
          // }
        } else {
          $scrollBox.className = "nav_bars scrollBox";
        }
      } else {
        $scrollBox.className = "nav_bars";
      }
      for (var i = sections.length - 1; i >= 0; i--) {
        if (self.scroll >= (self.ceiling ? sections[i].offsetTop : sections[i].offsetTop)) {
          self.activeMenu = i;
          $navs.className = "fl_left nav1";
          $navs[i].className = "fl_left nav1 cur";
          break;
        }
      }
    },
    dataScroll: function () {
      if (window.innerHeight > 600) {
        this.ceiling = true;
      } else {
        this.ceiling = false;
      }
      this.scroll = document.documentElement.scrollTop || document.body.scrollTop;
    },
    jump(tab, event) {
      let target = document.querySelector(".scroll-content");
      let scrollItems = document.querySelectorAll(".scroll-item");
      // 判断滚动条是否滚动到底部
      if (target.scrollHeight <= target.scrollTop + target.clientHeight) {
        this.tabIndex = tab.index.toString();
      }
      let totalY = scrollItems[tab.index].offsetTop - scrollItems[0].offsetTop; // 锚点元素距离其offsetParent(这里是body)顶部的距离(待滚动的距离)
      let distance = document.querySelector(".scroll-content").scrollTop; // 滚动条距离滚动区域顶部的距离
      // let distance = document.body.scrollTop || document.documentElement.scrollTop || window.pageYOffset // 滚动条距离滚动区域顶部的距离(滚动区域为窗口)
      // 滚动动画实现, 使用setTimeout的递归实现平滑滚动，将距离细分为50小段，10ms滚动一次
      // 计算每一小段的距离
      let step = totalY / 50;
      if (totalY > distance) {
        smoothDown(document.querySelector(".scroll-content"));
      } else {
        let newTotal = distance - totalY;
        step = newTotal / 50;
        smoothUp(document.querySelector(".scroll-content"));
      }

      // 参数element为滚动区域
      function smoothDown(element) {
        if (distance < totalY) {
          distance += step;
          element.scrollTop = distance;
          setTimeout(smoothDown.bind(this, element), 10);
        } else {
          element.scrollTop = totalY;
        }
      }

      // 参数element为滚动区域
      function smoothUp(element) {
        if (distance > totalY) {
          distance -= step;
          element.scrollTop = distance;
          setTimeout(smoothUp.bind(this, element), 10);
        } else {
          element.scrollTop = totalY;
        }
      }
    },
    // 滚动条滚动
    onScroll(e) {
      let scrollItems = document.querySelectorAll(".detail-item");
      for (let i = scrollItems.length - 1; i >= 0; i--) {
        // 判断滚动条滚动距离是否大于当前滚动项可滚动距离
        let judge = e.target.scrollTop >= scrollItems[i].offsetTop - scrollItems[0].offsetTop - 400;
        if (judge) {
          this.tabIndex = i.toString();
          // 找对应的tab-name值
          this.tabName = this.tabs[this.tabIndex].refName;
          break;
        }
      }
    },
    getHight() {
      this.contentStyleObj.height = window.innerHeight - 190 + "px";
    },

    async loadMore() {
      // console.log(
      //   "loadMore",
      //   this.busy || this.listQuery.pageNum >= this.maxPage
      // );
      if (this.busy || this.listQuery.pageNum >= this.maxPage) return;
      this.busy = true;
      this.listQuery.pageNum += 1;
      await this.getList();
    },
    getList() {
      this.$get(this.$api + "/un/web/governancesub", this.listQuery).then((res) => {
        this.allGovernanceObj = res.data;
        this.nav_bar_list = res.data.subDtos;
        this.bannerList = res.data.banner;
      });
    },
    changeLabel(id, label) {
      this.listQuery.labelId = id;
      this.listQuery.pageNum = 1;
      this.currentLabel = label;
      this.artData = [];
      this.getList();
    },
    getLabels() {
      this.$get(this.$api + "/cms/web/getLabelByPartId", {
        partId: this.listQuery.columnId,
      }).then((res) => {
        this.labelData = res.data;
      });
    },
    getListMore() {
      this.listQuery.pageNum += 1;
      this.getList();
    },
    getBanner() {
      this.$get(this.$api + "/cms/web/partArticleBanner", {
        menuId: this.listQuery.menuId,
      }).then((res) => {
        res.data.list.forEach((item) => {
          this.bannerList.push(item);
        });
        this.bannerData = res.data.banner[0];
        //  console.log(this.bannerList, this.bannerData);
      });
    },
    viewTypeChange(type) {
      this.artData = [];
      this.listQuery.pageNum = 1;
      this.getList();
      this.currentView = type;
      this.$nextTick(() => {
        this.$redrawVueMasonry();
      });
    },
  },
};
</script>
<style>
.gov_detail_content_info {
  line-height: 22px;
  overflow-wrap: break-word;
  color: rgba(42, 42, 42, 1);
  font-size: 14px;
  font-weight: normal;
}

.gov_detail_content_info img {
  width: 100%;
  height: 100%;
  display: inline-block;
  margin: 10px 0;
}
</style>
<style lang="scss" scoped>
#china {
  position: relative;
  width: 100%;

  &::after {
    // content: "";
    position: absolute;
    left: 0;
    top: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    background: url("../assets/images/ddzg-bg.jpg") no-repeat;
    background-size: 100% auto;
    background-position: center 0;
  }

  .page {
    padding: fh(152vh, pc) fw(80vw, pc) 0 fw(80vw, pc);
    background: #fff;

    ::v-deep .el-breadcrumb {
      // margin-left: fw(-40vw, pc);
      .el-breadcrumb__inner {
        font-weight: bold;
        color: #fff !important;
        font-size: fh(18vh, pc);
      }
    }
  }

  .page-content {
    padding: 0 fw(80vw, pc) fh(40vh, pc) fw(80vw, pc);
    background-color: #fff;
  }

  .art-row {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: fh(40vh, pc);
    width: 100%;
    .governance_content {
      width: 93%;
      .gov_content_box {
        display: flex;
        .gov_content_left {
          width: 80%;

          .detail_item {
            .detail_item_title {
              overflow-wrap: break-word;
              color: rgba(0, 93, 176, 1);
              font-size: 24px;
              font-family: "SourceHanSansCN-Medium";
              font-weight: 500;
              text-align: left;
              white-space: nowrap;
              line-height: 43px;
            }
          }
        }
        .gov_content_right {
          width: 25%;

          .el-tabs--right .el-tabs__header.is-right {
            float: none !important;
            margin-left: -50px !important;
          }
        }
      }
    }

    .book-content {
      background-color: $fh90;
      padding-bottom: fh(40vh, pc);

      .book-btn {
        display: flex;
        width: 100%;
        align-items: flex-end;
        justify-content: center;

        img {
          width: fw(180vw, pc);

          &:hover {
            cursor: pointer;
            opacity: 0.7;
          }
        }
      }

      .book-row {
        display: flex;
        width: 100%;
        padding: fh(46vh, pc) fw(20vw, pc);
        color: $sh;

        img.book-img {
          width: fw(280vw, pc);
        }

        .book-text {
          padding-left: fw(10vw, pc);

          .view-label {
            color: $zh;
            position: relative;
            display: inline-block;
            font-size: fh(24vh, pc);
            font-weight: 800;
            margin-top: fh(20vh, pc);
            margin-bottom: fh(60vh, pc);

            &::after {
              content: "";
              position: absolute;
              bottom: fh(-16vh, pc);
              right: fw(-12vw, pc);
              width: fw(30vw, pc);
              height: fh(18vh, pc);
              border-right: fw(6vw, pc) solid hsla(14, 74%, 37%, 0.2);
              border-bottom: fw(8vw, pc) solid hsla(14, 74%, 37%, 0.2);
            }
          }

          .text-item {
            padding-bottom: fh(30vh, pc);

            .item-title {
              color: $sh;
              font-size: fh(18vh, pc);
              font-weight: bold;
              padding-bottom: fh(20vh, pc);
            }

            .item-content {
              font-size: fh(16vh, pc);
              line-height: fh(26vh, pc);
            }
          }
        }
      }
    }

    .row-right {
      display: flex;
      flex: 1;
      margin-left: fw(20vw, pc);
      flex-flow: column;

      .hot-article {
        width: 100%;
        padding: fh(30vh, pc) fw(30vw, pc);
        background-color: $fh90;
        margin-top: 0;

        .article-label {
          color: $zh;
          position: relative;
          display: inline-block;
          font-size: fh(24vh, pc);
          font-weight: 800;
          margin-top: fh(20vh, pc);
          margin-bottom: fh(60vh, pc);

          &::after {
            content: "";
            position: absolute;
            bottom: fh(-16vh, pc);
            right: fw(-12vw, pc);
            width: fw(30vw, pc);
            height: fh(18vh, pc);
            border-right: fw(6vw, pc) solid hsla(14, 74%, 37%, 0.2);
            border-bottom: fw(8vw, pc) solid hsla(14, 74%, 37%, 0.2);
          }
        }

        .article-view {
          color: $sh;

          .article-item {
            width: fw(485vw, pc);
            line-height: fh(26vh, pc);
            margin-bottom: fh(26vh, pc);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;

            span {
              color: $zh;
              font-size: fh(18vh, pc);
              font-weight: bold;
              display: inline-block;
              padding-right: fw(16vw, pc);
            }

            &:hover {
              opacity: 0.8;
              cursor: pointer;
              color: $zh;
            }
          }
        }
      }
    }
  }

  .art-col {
    position: relative;
    width: fw(1180vw, pc);
    margin-top: fh(20vh, pc);

    .art-tab {
      width: 100%;
      display: flex;
      align-items: center;
      margin-bottom: fh(30vh, pc);
      color: $sh;

      .tab-item {
        margin-right: fw(60vw, pc);
        font-size: fh(16vh, pc);
        position: relative;
        line-height: fh(24vh, pc);

        &:hover {
          color: $sh;
          cursor: pointer;
        }

        &.active {
          font-size: fh(20vh, pc);
          font-weight: bold;
          color: $sh;

          &::before {
            content: "";
            position: absolute;
            bottom: fh(-14vh, pc);
            width: 100%;
            border-top: fh(6vh, pc) solid $zh;
          }
        }
      }

      .tab-info {
        margin-left: auto;
        display: flex;
        align-items: center;

        .toggle-img {
          margin-left: fh(62vw, pc);
          margin-right: fh(24vw, pc);
        }

        img {
          width: fw(20vw, pc);
          cursor: pointer;
        }
      }
    }

    .art-view {
      cursor: pointer;

      &.text {
        .art-item {
          width: 100%;
        }

        .item-title {
          color: $sh;
          display: flex;
          width: 100%;

          .item-info {
            padding-left: fw(40vw, pc);
            margin-left: auto;
            width: max-content !important;

            .info-label {
              margin-right: fw(20vw, pc);
              width: max-content !important;
            }

            .info-time {
              width: max-content;
              margin-left: fw(20vw, pc) !important;
            }
          }
        }
      }

      .art-item {
        // break-inside: avoid;
        width: calc((100% - 40px) / 3);
        margin-bottom: fh(20vh, pc);
        background-color: $dh;

        &:hover {
          opacity: 0.9;
        }

        img {
          width: 100%;
        }

        .art-content {
          width: 100%;
          color: rgba(251, 254, 255, 0.8);
          padding: fh(20vh, pc) fw(20vw, pc);
          position: relative;
          z-index: 2;
          background-color: $dh;

          .item-title {
            color: $sh;
            font-size: fh(16vh, pc);
            line-height: fh(22vh, pc);
            margin-bottom: fh(8vh, pc);
            font-weight: 600;
          }

          .item-info {
            display: flex;
            align-items: center;
            justify-content: space-between;
            // margin-bottom: fh(12vh, pc);
            font-size: fh(14vh, pc);
            line-height: fh(20vh, pc);

            .info-time {
              color: #a1b8bd;
              margin-left: auto;
            }
          }

          .item-content {
            font-size: fh(14vh, pc);
            line-height: fh(20vh, pc);
            font-weight: 400;
            width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
          }
        }
      }
    }

    .art-more {
      width: max-content;
      margin: fh(40vh, pc) auto;
      color: $sh;
      font-size: fh(14vh, pc);

      &.true:hover {
        cursor: pointer;
        opacity: 0.8;
        color: $zh;
      }

      &.none {
        opacity: 0.5;
      }
    }
  }

  .banner-view {
    display: flex;
    width: 100%;
    margin-top: fh(16vh, pc);

    .content-view {
      position: absolute;
      left: 0;
      bottom: 0;
      width: 100%;
      padding: fh(20vh, pc) fw(40vw, pc);
      padding-bottom: fh(40vh, pc);
      background: linear-gradient(180deg, rgba(34, 0, 0, 0.3) 0%, $sh 100%);
      color: #fff;

      .content-title {
        font-size: fh(20vh, pc);
        line-height: fh(30vh, pc);
        margin-bottom: fh(12vh, pc);
      }

      .content-text {
        font-size: fh(14vh, pc);
        line-height: fh(23vh, pc);
        height: fh(46vh, pc);
      }
    }

    .banner-col {
      position: relative;
      width: fw(1180vw, pc);
      margin-right: fw(20vw, pc);
      cursor: pointer;
      opacity: 0.9;

      .col-text {
        display: flex;
        align-items: center;

        .text-item {
          flex: 1;
          color: #fff;
          padding: fh(20vh, pc) fw(20vw, pc);
          background-color: $dh;
          font-size: fh(16vh, pc);
          line-height: fh(24vh, pc);
          margin: 0 fw(2vw, pc);

          &.active {
            background-color: $zh;
          }

          &:nth-child(1) {
            margin-left: 0;
          }

          &:nth-last-child(1) {
            margin-right: 0;
          }

          &:hover {
            opacity: 0.8;
            cursor: pointer;
          }
        }
      }

      .banner-big {
        width: 100%;
        display: block;
      }
    }

    .int-col {
      position: relative;
      width: fw(560vw, pc);
      background-color: rgba(15, 0, 0, 0.5);
      cursor: pointer;
      opacity: 0.9;

      > img {
        width: 100%;
      }

      .int-content {
        padding: fh(20vh, pc) fw(20vw, pc);

        .content-title {
          font-size: fh(24vh, pc);
          font-weight: 800;
          color: #a1b8bd;
          line-height: fh(35vh, pc);
        }

        .content-import {
          margin-top: fh(40vh, pc);
          position: relative;
          color: #d6d6d6;
          padding: fh(24vh, pc) fw(20vw, pc);
          padding-bottom: fh(16vh, pc);
          background-color: rgba(255, 255, 255, 0.5);
          font-size: fh(16vh, pc);
          font-weight: 800;
          line-height: fh(24vh, pc);

          &::before {
            content: "“";
            font-family: cursive;
            position: absolute;
            font-size: fh(60vh, pc);
            left: fh(-20vw, pc);
            top: fh(5vh, pc);
            color: $zh;
          }

          &::after {
            content: "”";
            font-family: cursive;
            position: absolute;
            font-size: fh(60vh, pc);
            right: fh(-20vw, pc);
            bottom: fh(-24vh, pc);
            color: $zh;
          }
        }

        .content-html {
          margin-top: fh(50vh, pc);

          p {
            font-size: fh(14vh, pc);
            font-family: "宋体";
            font-weight: 400;
            color: rgba(255, 255, 255, 0.8);
            line-height: fh(20vh, pc);
            margin-top: fh(26vh, pc);
          }

          .html-title {
            font-size: fh(16vh, pc);
            font-weight: bold;
            color: #ffffff;
            line-height: fh(24vh, pc);
          }
        }
      }

      .label-view {
        display: flex;
        width: 100%;
        justify-content: space-between;
        align-items: center;
        color: #fff;
        padding: fh(40vh, pc) fw(20vw, pc) fh(28vh, pc) fw(20vw, pc);
        border-bottom: 1px solid #fff;

        .int-label {
          color: #d6d6d6;
          position: relative;
          display: inline-block;
          font-size: fh(24vh, pc);
          font-weight: 800;

          &::after {
            content: "";
            position: absolute;
            bottom: fh(-16vh, pc);
            right: fw(-12vw, pc);
            width: fw(30vw, pc);
            height: fh(18vh, pc);
            border-right: fw(6vw, pc) solid #d6d6d6;
            border-bottom: fw(8vw, pc) solid #d6d6d6;
          }
        }

        .int-more {
          font-size: fh(14vh, pc);
          font-weight: 600;
          line-height: fh(20vh, pc);
          color: rgba(255, 255, 255, 0.5);

          &:hover {
            cursor: pointer;
            color: #fff;
          }
        }
      }
    }
  }
}

#china.h5 {
  &::after {
    background-size: auto;
  }

  .banner-view {
    flex-wrap: wrap;

    .banner-col {
      width: 100%;
      margin-bottom: fh(20vh, h5);
    }

    .int-col {
      width: 100%;
    }

    .content-view {
      padding: 10px;
      bottom: -2px;
      z-index: 2;

      .content-title {
        margin-bottom: 6px;
      }

      .content-text {
        display: none;
      }
    }
  }

  .art-col .art-view {
    &.text {
      .art-item {
        width: 100%;
      }
    }

    .art-item {
      width: calc(50% - 10px);
      margin-bottom: fw(8vw, h5);

      .art-content {
        padding: fw(8vw, h5) !important;
      }
    }
  }
}
.nav_bars {
  height: 40px;
  font-size: 14px;
  line-height: 40px;
  // background: #f4f4f4;
  position: relative;
}
.nav1 {
  padding: 0 14px;
  line-height: 40px;
  font-family: "SourceHanSansCN-Bold";
  font-size: 14px;
  cursor: pointer;
  border-left: 1px solid #1586c9;
}
.nav1.cur {
  padding: 0 13px;
  color: #1586c9;
  background: #fff;
  font-size: 14px;
  border-left: 2px solid #1586c9;
}
.nav_bars.scrollBox {
  position: fixed;
  top: 109px;
  z-index: 999;
}
.nav_bars.scrollBox1 {
  position: fixed;
  top: 81px;
  z-index: 999;
}
.nav_bars.scrollBox2 {
  position: fixed;
  top: 118px;
  z-index: 999;
}
.clearfix::after {
  content: "";
  display: block;
  clear: both;
}
</style>
